import { createAPI } from '@/utils/request'

// 获取表格数据接口
export const list = data => createAPI('/questions/choice', 'get', data)

// 获取学科下拉列表接口
export const subjects = data => createAPI('/subjects/simple', 'get', data)

// 获取用户列表接口
export const users = data => createAPI('/users', 'get', data)

// 获取二级目录下拉列表
export const directorys = data => createAPI('/directorys', 'get', data)

// 获取标签下拉列表
export const tags = data => createAPI('/tags/simple', 'get', data)

// 预览功能获取信息接口
export const preview = data => createAPI(`/questions/${data.id}`, 'get', data)

// 试题审核接口
export const review = data => createAPI(`/questions/check/${data.id}`, 'post', data)

// 上架下架接口
export const publish = data => createAPI(`/questions/choice/${data.id}/${data.publishState}`, 'post', data)

// 删除接口
export const del = data => createAPI(`/questions/${data.id}`, 'delete', data)
